package db7;

public class Computer extends Student{
    double caozuonegli;
    double englishiwrite;
    double mtest;
    double ttest;
    public Computer(int sno,String name,String sex,int age,double caozuonegli,double englishiwrite,double mtest,double ttest){
        super(sno,name,sex,age);
        this.caozuonegli=caozuonegli;
        this.englishiwrite=englishiwrite;
        this.mtest=mtest;
        this.ttest=ttest;
    }
    @Override
    public double getGrade(){
        double grade =0;
        grade=caozuonegli*0.4+englishiwrite*0.2+mtest*0.2+ttest*0.2;
        return grade;
    }
}
